<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>合生元</title>
	<script src=" https://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>	  
	<script src="../assets/scripts/draw/jquery-1.11.2.min.js?v=${fns:getConfig('drawVersion')}"></script>	    
    <script>
        var phoneWidth = parseInt(window.screen.width);
        var phoneHeight = parseInt(window.screen.height);
        var phoneScale = phoneWidth / 640;
        var ua = navigator.userAgent;
        if (/Android (\d+\.\d+)/.test(ua)) {
            var version = parseFloat(RegExp.$1);
            if (version > 2.3) {
                document.write('<meta name="viewport" content="width=640, initial-scale= ' + phoneScale + ' ,minimum-scale = ' + phoneScale + ', maximum-scale = ' + phoneScale + ', target-densitydpi=device-dpi">');
            }
            else {
                document.write('<meta name="viewport" content="width=640, initial-scale= ' + phoneScale + ' , target-densitydpi=device-dpi">');
            }
        }
        else {
            document.write('<meta name="viewport" content="width=640, user-scalable=no, target-densitydpi=device-dpi">');
        }
        
   	    $(function(){
   	    	
    	 	function onBridgeReady(){
    			WeixinJSBridge.call('hideOptionMenu');
    		}
    		
    		if (typeof WeixinJSBridge == "undefined"){
    		if( document.addEventListener ){
    				document.addEventListener('WeixinJSBridgeReady', onBridgeReady, false);
    			}else if (document.attachEvent){
    				document.attachEvent('WeixinJSBridgeReady', onBridgeReady); 
    				document.attachEvent('onWeixinJSBridgeReady', onBridgeReady);
    			}
    		}else{
    			onBridgeReady();
    		}		   	    	   	    	
   	    	
			$("#backgroundImage").attr('src','../assets/images/draw2/share1.1-bj.jpg') 
   	    	
   	    	$('.Popup1-box').css("background",'url(../assets/images/draw2/Popup-bj2.png)');
   	    	
   	    	//是否为会员
   	    	var rank = '${rank}';
   	    			
   			//奖品名称
   			var name ='${awardName}';
   			
   			//注册链接
   			var registerUrl = '${registerUrl}';
   			
   			//修改奖品信息
   			$(".winning-name").html(name);	
   			$(".winning-name2").html(name);	    	   			
   				
   			if(rank == 'nonMember'){
   	    		
   				//提示信息
   				var tipsHtml = null;   							
   				$(".winning-name2").hide();	
   															
   	              //跳到分享页面
   			   tipsHtml = "领取有效期为1个小时";				                
   	           $('.Frame-btn').html('填写手机号领取');	
   	           $('#Frame-clear1').hide();
   	           
   				$("#description").html(tipsHtml);	
   				
   	    		
   	       	 $(".Popup1-box").show();
   	    	}
   	    	
   	    })
        
        
</script>

    <link rel="stylesheet" href="../assets/css/draw/main2.css"/>
</head>
<body>
    <div class="wrap share1-bj">
        <img id = 'backgroundImage'  src="../assets/images/draw2/share1-bj.jpg" alt="合生元" width="640" height="1070">
			<c:forEach items="${gridList}" var="grid" varStatus="status">
				<c:choose>
				   <c:when test="${grid.isExists== 0 && grid.sort== 0}">  
    					<a href="javascript:;" class="samll-bird one-bird" id='${grid.id}' ></a>
				   </c:when>
				   <c:when test="${grid.isExists== 0 && grid.sort== 1}">  
    					<a href="javascript:;" class="samll-bird two-bird"id='${grid.id}' ></a>
				   </c:when>		
				   <c:when test="${grid.isExists== 0 && grid.sort== 2}">  
    					<a href="javascript:;" class="samll-bird three-bird" id='${grid.id}' ></a>
				   </c:when>	
				   <c:when test="${grid.isExists== 0 && grid.sort== 3}" >  
    					<a href="javascript:;" class="samll-bird four-bird" id='${grid.id}' ></a>
				   </c:when>						   					   		   
				</c:choose>							 					 
			</c:forEach>		
        <span class="RedeemCode">${moviecode }</span>
        <footer></footer>
    </div>
    
    <!--中奖弹窗start-->
    <div class="Popup1-box">
        <div class="light"></div>
        <div class="xx-content">
            <i class="small-xx small-xx-left"></i>
            <span class="large-xx"></span>
            <i class="small-xx small-xx-right"></i>
        </div>
        <div class="Frame">
            <span class="winning-title"></span>
            <h2><span class="winning-name"></span></h2>
            <h3>
                <p id="description">填写领奖信息吧</p>
               <span class="winning-name2">法国机票</span>
            </h3>
            <a href="#" class="Frame-btn">填写领奖信息</a>
        </div>
        <a href="javascript:;" class="Popup-bird1"></a>
    </div>
    <!--中奖弹窗end-->
 
<!--js-->
<script src="http://wximg.qq.com/wxp/libs/wxmoment/0.0.4/wxmoment.min.js"></script>

</body>
</html>